#include "sequence.h"
#include "cutscene_commands.h"
#include "player.h"

// clang-format off
CutsceneData gWindmillSpinningFasterCs[] = {
    CS_HEADER(4, 360),
    CS_DESTINATION(CS_DEST_KAKARIKO_VILLAGE_DRAIN_WELL, 200, 201),
    CS_CAM_EYE_SPLINE(0, 331),
        CS_CAM_POINT(CS_CAM_CONTINUE, 0x00, 0, CS_FLOAT(0x42700000, 60.0f), 3100, 201, -100, 0x3235),
        CS_CAM_POINT(CS_CAM_CONTINUE, 0x00, 0, CS_FLOAT(0x42700000, 60.0f), 3100, 201, -100, 0x3336),
        CS_CAM_POINT(CS_CAM_CONTINUE, 0x00, 0, CS_FLOAT(0x42700000, 60.0f), 3100, 201, -100, 0x392C),
        CS_CAM_POINT(CS_CAM_CONTINUE, 0x00, 0, CS_FLOAT(0x42700000, 60.0f), 3178, 201, 113, 0x2C20),
        CS_CAM_POINT(CS_CAM_CONTINUE, 0x00, 0, CS_FLOAT(0x42700000, 60.0f), 3178, 201, 113, 0x3235),
        CS_CAM_POINT(CS_CAM_CONTINUE, 0x00, 0, CS_FLOAT(0x42700000, 60.0f), 3178, 201, 113, 0x3238),
        CS_CAM_POINT(CS_CAM_CONTINUE, 0x00, 0, CS_FLOAT(0x42700000, 60.0f), 3178, 201, 113, 0x3639),
        CS_CAM_POINT(CS_CAM_STOP, 0x00, 0, CS_FLOAT(0x42700000, 60.0f), 3178, 201, 113, 0x2C20),
    CS_CAM_AT_SPLINE(0, 360),
        CS_CAM_POINT(CS_CAM_CONTINUE, 0x00, 30, CS_FLOAT(0x42700000, 60.0f), 3054, 137, -64, 0x3235),
        CS_CAM_POINT(CS_CAM_CONTINUE, 0x00, 30, CS_FLOAT(0x42700000, 60.0f), 3054, 137, -64, 0x3336),
        CS_CAM_POINT(CS_CAM_CONTINUE, 0x00, 90, CS_FLOAT(0x42700000, 60.0f), 3054, 137, -64, 0x392C),
        CS_CAM_POINT(CS_CAM_CONTINUE, 0x00, 90, CS_FLOAT(0x42700000, 60.0f), 3118, 142, 96, 0x2C20),
        CS_CAM_POINT(CS_CAM_CONTINUE, 0x00, 30, CS_FLOAT(0x42700000, 60.0f), 3118, 142, 96, 0x3235),
        CS_CAM_POINT(CS_CAM_CONTINUE, 0x00, 30, CS_FLOAT(0x42700000, 60.0f), 3118, 142, 96, 0x3238),
        CS_CAM_POINT(CS_CAM_CONTINUE, 0x00, 30, CS_FLOAT(0x42700000, 60.0f), 3118, 142, 96, 0x3639),
        CS_CAM_POINT(CS_CAM_STOP, 0x00, 30, CS_FLOAT(0x42700000, 60.0f), 3118, 142, 96, 0x2C20),
    CS_MISC_LIST(1),
        CS_MISC(CS_MISC_SET_FLAG_FAST_WINDMILL, 30, 31, 0x0000, 0x00000000, 0xFFFFFFFE, 0x00000000, 0x00000002, 0xFFFFFFFE, 0x00000000, 0x00000002, 0x00000000, 0x00000000, 0x00000000),
    CS_END_OF_SCRIPT(),
};

CutsceneData gDoorOfTimeOpeningCs[] = {
    CS_HEADER(18, 3000),
    CS_UNK_DATA_LIST(0x00000021, 1),
        CS_UNK_DATA(0x00010000, 0x0BB80000, 0x00000000, 0x00000000, 0xFFFFFFAA, 0xFFFFFFAE, 0x00000000, 0xFFFFFFAA, 0xFFFFFFAE, 0x00000000, 0x00000000, 0x00000000),
    CS_PLAYER_CUE_LIST(3),
        CS_PLAYER_CUE(PLAYER_CUEID_17, 0, 80, 0x0000, 0x8000, 0x0000, 0, -40, 1400, 0, -40, 1400, CS_FLOAT(0x0, 0.0f), CS_FLOAT(0x0, 0.0f), CS_FLOAT(0x1, 1e-45f)),
        CS_PLAYER_CUE(PLAYER_CUEID_18, 80, 201, 0x0000, 0x8000, 0x0000, 0, -40, 1400, 0, -40, 1400, CS_FLOAT(0x0, 0.0f), CS_FLOAT(0x0, 0.0f), CS_FLOAT(0x1, 1e-45f)),
        CS_PLAYER_CUE(PLAYER_CUEID_5, 201, 662, 0x0000, 0x8000, 0x0000, 0, -40, 1400, 0, -40, 1400, CS_FLOAT(0x0, 0.0f), CS_FLOAT(0x0, 0.0f), CS_FLOAT(0x1, 1e-45f)),
    CS_MISC_LIST(1),
        CS_MISC(CS_MISC_TRIFORCE_FLASH, 510, 611, 0x0000, 0x00000000, 0xFFFFFFFF, 0x00000000, 0x00000000, 0xFFFFFFFF, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000),
    CS_ACTOR_CUE_LIST(CS_CMD_ACTOR_CUE_1_5, 1),
        CS_ACTOR_CUE(0x0003, 160, 289, 0x0000, 0x0000, 0x0000, 0, 20, 1400, 0, 60, 1400, CS_FLOAT(0x0, 0.0f), CS_FLOAT(0x3E9EC27B, 0.31007752f), CS_FLOAT(0x0, 0.0f)),
    CS_ACTOR_CUE_LIST(CS_CMD_ACTOR_CUE_1_5, 3),
        CS_ACTOR_CUE(0x0004, 340, 420, 0x0000, 0x0000, 0x0000, 0, 120, 1335, 0, 40, 1335, CS_FLOAT(0x0, 0.0f), CS_FLOAT(0xBF800000, -1.0f), CS_FLOAT(0x0, 0.0f)),
        CS_ACTOR_CUE(0x0004, 420, 465, 0x0000, 0x0000, 0x0000, 0, 40, 1335, 0, 16, 1335, CS_FLOAT(0x0, 0.0f), CS_FLOAT(0xBF088889, -0.53333336f), CS_FLOAT(0x0, 0.0f)),
        CS_ACTOR_CUE(0x0002, 465, 519, 0x0000, 0x0000, 0x0000, 0, 16, 1335, 0, 16, 1335, CS_FLOAT(0x0, 0.0f), CS_FLOAT(0x0, 0.0f), CS_FLOAT(0x0, 0.0f)),
    CS_MISC_LIST(1),
        CS_MISC(CS_MISC_SET_CSFLAG_0, 620, 621, 0x0000, 0x00000000, 0x00000001, 0x00000000, 0xFFFFFFFF, 0x00000001, 0x00000000, 0xFFFFFFFF, 0x00000000, 0x00000000, 0x00000000),
    CS_TRANSITION(CS_TRANS_GRAY_FILL_IN, 338, 341),
    CS_TRANSITION(CS_TRANS_GRAY_FILL_OUT, 344, 349),
    CS_MISC_LIST(1),
        CS_MISC(CS_MISC_STOP_CUTSCENE, 790, 791, 0x0000, 0x00000000, 0x00000000, 0x00000000, 0x00000002, 0x00000000, 0x00000000, 0x00000002, 0x00000000, 0x00000000, 0x00000000),
    CS_TRANSITION(CS_TRANS_GRAY_FILL_IN, 157, 160),
    CS_TRANSITION(CS_TRANS_GRAY_FILL_OUT, 159, 166),
    CS_START_SEQ_LIST(1),
        CS_START_SEQ(NA_BGM_DOOR_OF_TIME, 560, 561, 0x0000, 0x00000000, 0x00000003, 0x00000000, 0x00000004, 0x00000003, 0x00000000, 0x00000004),
    CS_CAM_EYE_SPLINE(0, 451),
        CS_CAM_POINT(CS_CAM_CONTINUE, 0x00, 0, CS_FLOAT(0x42700000, 60.0f), 2, 11, 1397, 0xA220),
        CS_CAM_POINT(CS_CAM_CONTINUE, 0x00, 0, CS_FLOAT(0x42700000, 60.0f), 2, 11, 1397, 0xB820),
        CS_CAM_POINT(CS_CAM_CONTINUE, 0x00, 0, CS_FLOAT(0x42700000, 60.0f), 2, 11, 1397, 0xD0A1),
        CS_CAM_POINT(CS_CAM_CONTINUE, 0x00, 0, CS_FLOAT(0x42700000, 60.0f), 0, 27, 1445, 0xBAEE),
        CS_CAM_POINT(CS_CAM_CONTINUE, 0x00, 0, CS_FLOAT(0x42700000, 60.0f), 56, 27, 1385, 0xA5AF),
        CS_CAM_POINT(CS_CAM_CONTINUE, 0x00, 0, CS_FLOAT(0x42700000, 60.0f), -19, 27, 1341, 0xAE0A),
        CS_CAM_POINT(CS_CAM_CONTINUE, 0x00, 0, CS_FLOAT(0x42700000, 60.0f), -44, -4, 1429, 0xA8A5),
        CS_CAM_POINT(CS_CAM_CONTINUE, 0x00, 0, CS_FLOAT(0x42700000, 60.0f), -44, -4, 1429, 0xA5ED),
        CS_CAM_POINT(CS_CAM_CONTINUE, 0x00, 0, CS_FLOAT(0x42700000, 60.0f), -44, -4, 1429, 0xA220),
        CS_CAM_POINT(CS_CAM_CONTINUE, 0x00, 0, CS_FLOAT(0x42700000, 60.0f), -44, -4, 1429, 0xA5A4),
        CS_CAM_POINT(CS_CAM_CONTINUE, 0x00, 0, CS_FLOAT(0x42700000, 60.0f), -44, -4, 1429, 0x20BA),
        CS_CAM_POINT(CS_CAM_CONTINUE, 0x00, 0, CS_FLOAT(0x42700000, 60.0f), -44, -4, 1429, 0xC9A5),
        CS_CAM_POINT(CS_CAM_CONTINUE, 0x00, 0, CS_FLOAT(0x42700000, 60.0f), -44, -4, 1429, 0xA5A2),
        CS_CAM_POINT(CS_CAM_CONTINUE, 0x00, 0, CS_FLOAT(0x42700000, 60.0f), -44, -4, 1429, 0xA5BB),
        CS_CAM_POINT(CS_CAM_CONTINUE, 0x00, 0, CS_FLOAT(0x42700000, 60.0f), -44, -4, 1429, 0xAE0A),
        CS_CAM_POINT(CS_CAM_STOP, 0x00, 0, CS_FLOAT(0x42700000, 60.0f), -44, -4, 1429, 0xB3A5),
    CS_CAM_EYE_SPLINE(340, 1461),
        CS_CAM_POINT(CS_CAM_CONTINUE, 0x00, 0, CS_FLOAT(0x42700000, 60.0f), -6, 15, 1560, 0xA220),
        CS_CAM_POINT(CS_CAM_CONTINUE, 0x00, 0, CS_FLOAT(0x42700000, 60.0f), -6, 15, 1560, 0xB820),
        CS_CAM_POINT(CS_CAM_CONTINUE, 0x00, 0, CS_FLOAT(0x42700000, 60.0f), -6, 15, 1560, 0xD0A1),
        CS_CAM_POINT(CS_CAM_CONTINUE, 0x00, 0, CS_FLOAT(0x42700000, 60.0f), -6, 15, 1560, 0xBAEE),
        CS_CAM_POINT(CS_CAM_CONTINUE, 0x00, 0, CS_FLOAT(0x42700000, 60.0f), -6, 15, 1560, 0xA5AF),
        CS_CAM_POINT(CS_CAM_STOP, 0x00, 0, CS_FLOAT(0x42700000, 60.0f), -6, 15, 1560, 0xAE0A),
    CS_CAM_EYE_SPLINE(490, 941),
        CS_CAM_POINT(CS_CAM_CONTINUE, 0x00, 0, CS_FLOAT(0x42700000, 60.0f), 0, 264, 1379, 0xA220),
        CS_CAM_POINT(CS_CAM_CONTINUE, 0x00, 0, CS_FLOAT(0x42700000, 60.0f), 0, 264, 1379, 0xB820),
        CS_CAM_POINT(CS_CAM_CONTINUE, 0x00, 0, CS_FLOAT(0x42700000, 60.0f), 0, 264, 1379, 0xD0A1),
        CS_CAM_POINT(CS_CAM_CONTINUE, 0x00, 0, CS_FLOAT(0x42700000, 60.0f), 0, 264, 1379, 0xBAEE),
        CS_CAM_POINT(CS_CAM_CONTINUE, 0x00, 0, CS_FLOAT(0x42700000, 60.0f), 0, 153, 1379, 0xA5AF),
        CS_CAM_POINT(CS_CAM_CONTINUE, 0x00, 0, CS_FLOAT(0x42700000, 60.0f), 55, 32, 1398, 0xAE0A),
        CS_CAM_POINT(CS_CAM_CONTINUE, 0x00, 0, CS_FLOAT(0x42700000, 60.0f), 111, -38, 1511, 0xA8A5),
        CS_CAM_POINT(CS_CAM_CONTINUE, 0x00, 0, CS_FLOAT(0x42700000, 60.0f), 111, -38, 1511, 0xA5ED),
        CS_CAM_POINT(CS_CAM_CONTINUE, 0x00, 0, CS_FLOAT(0x42700000, 60.0f), 111, -38, 1511, 0xA220),
        CS_CAM_POINT(CS_CAM_CONTINUE, 0x00, 0, CS_FLOAT(0x42700000, 60.0f), 111, -38, 1511, 0xA5A4),
        CS_CAM_POINT(CS_CAM_CONTINUE, 0x00, 0, CS_FLOAT(0x42700000, 60.0f), 111, -38, 1511, 0x20BA),
        CS_CAM_POINT(CS_CAM_CONTINUE, 0x00, 0, CS_FLOAT(0x42700000, 60.0f), 111, -38, 1511, 0xC9A5),
        CS_CAM_POINT(CS_CAM_CONTINUE, 0x00, 0, CS_FLOAT(0x42700000, 60.0f), 111, -38, 1511, 0xA5A2),
        CS_CAM_POINT(CS_CAM_STOP, 0x00, 0, CS_FLOAT(0x42700000, 60.0f), 111, -38, 1511, 0xA5BB),
    CS_CAM_AT_SPLINE(0, 480),
        CS_CAM_POINT(CS_CAM_CONTINUE, 0x00, 30, CS_FLOAT(0x42700000, 60.0f), 2, 36, 1335, 0xA220),
        CS_CAM_POINT(CS_CAM_CONTINUE, 0x00, 30, CS_FLOAT(0x42700000, 60.0f), 2, 36, 1335, 0xB820),
        CS_CAM_POINT(CS_CAM_CONTINUE, 0x00, 30, CS_FLOAT(0x42700000, 60.0f), 2, 36, 1335, 0xD0A1),
        CS_CAM_POINT(CS_CAM_CONTINUE, 0x00, 30, CS_FLOAT(0x42700000, 60.0f), 0, -8, 1391, 0xBAEE),
        CS_CAM_POINT(CS_CAM_CONTINUE, 0x00, 30, CS_FLOAT(0x42700000, 60.0f), 1, -5, 1398, 0xA5AF),
        CS_CAM_POINT(CS_CAM_CONTINUE, 0x00, 30, CS_FLOAT(0x42700000, 60.0f), -2, -3, 1394, 0xAE0A),
        CS_CAM_POINT(CS_CAM_CONTINUE, 0x00, 30, CS_FLOAT(0x42700000, 60.0f), 5, 0, 1399, 0xA8A5),
        CS_CAM_POINT(CS_CAM_CONTINUE, 0x00, 30, CS_FLOAT(0x42700000, 60.0f), 1, 14, 1399, 0xA5ED),
        CS_CAM_POINT(CS_CAM_CONTINUE, 0x00, 30, CS_FLOAT(0x42700000, 60.0f), -9, 33, 1402, 0xA220),
        CS_CAM_POINT(CS_CAM_CONTINUE, 0x00, 30, CS_FLOAT(0x42700000, 60.0f), -14, 41, 1409, 0xA5A4),
        CS_CAM_POINT(CS_CAM_CONTINUE, 0x00, 30, CS_FLOAT(0x42700000, 60.0f), -14, 41, 1409, 0x20BA),
        CS_CAM_POINT(CS_CAM_CONTINUE, 0x00, 30, CS_FLOAT(0x42700000, 60.0f), -14, 41, 1409, 0xC9A5),
        CS_CAM_POINT(CS_CAM_CONTINUE, 0x00, 30, CS_FLOAT(0x42700000, 60.0f), -14, 41, 1409, 0xA5A2),
        CS_CAM_POINT(CS_CAM_CONTINUE, 0x00, 30, CS_FLOAT(0x42700000, 60.0f), -14, 41, 1409, 0xA5BB),
        CS_CAM_POINT(CS_CAM_CONTINUE, 0x00, 30, CS_FLOAT(0x42700000, 60.0f), -14, 41, 1409, 0xAE0A),
        CS_CAM_POINT(CS_CAM_STOP, 0x00, 30, CS_FLOAT(0x42700000, 60.0f), -14, 41, 1409, 0xB3A5),
    CS_CAM_AT_SPLINE(340, 1490),
        CS_CAM_POINT(CS_CAM_CONTINUE, 0x00, 30, CS_FLOAT(0x42700000, 60.0f), -3, 48, 1414, 0xA220),
        CS_CAM_POINT(CS_CAM_CONTINUE, 0x00, 30, CS_FLOAT(0x42700000, 60.0f), -3, 48, 1414, 0xB820),
        CS_CAM_POINT(CS_CAM_CONTINUE, 0x00, 1000, CS_FLOAT(0x42700000, 60.0f), -3, 48, 1414, 0xD0A1),
        CS_CAM_POINT(CS_CAM_CONTINUE, 0x00, 30, CS_FLOAT(0x42700000, 60.0f), -3, 48, 1414, 0xBAEE),
        CS_CAM_POINT(CS_CAM_CONTINUE, 0x00, 30, CS_FLOAT(0x42700000, 60.0f), -3, 47, 1414, 0xA5AF),
        CS_CAM_POINT(CS_CAM_STOP, 0x00, 30, CS_FLOAT(0x42700000, 60.0f), -3, 47, 1414, 0xAE0A),
    CS_CAM_AT_SPLINE(490, 970),
        CS_CAM_POINT(CS_CAM_CONTINUE, 0x00, 30, CS_FLOAT(0x42700000, 60.0f), 0, 264, 1274, 0xA220),
        CS_CAM_POINT(CS_CAM_CONTINUE, 0x00, 60, CS_FLOAT(0x42700000, 60.0f), 0, 264, 1274, 0xB820),
        CS_CAM_POINT(CS_CAM_CONTINUE, 0x00, 60, CS_FLOAT(0x42700000, 60.0f), 0, 264, 1274, 0xD0A1),
        CS_CAM_POINT(CS_CAM_CONTINUE, 0x00, 30, CS_FLOAT(0x42700000, 60.0f), 0, 264, 1274, 0xBAEE),
        CS_CAM_POINT(CS_CAM_CONTINUE, 0x00, 30, CS_FLOAT(0x42700000, 60.0f), 0, 170, 1275, 0xA5AF),
        CS_CAM_POINT(CS_CAM_CONTINUE, 0x00, 30, CS_FLOAT(0x42700000, 60.0f), 10, 51, 1306, 0xAE0A),
        CS_CAM_POINT(CS_CAM_CONTINUE, 0x00, 30, CS_FLOAT(0x42700000, 60.0f), 68, -2, 1424, 0xA8A5),
        CS_CAM_POINT(CS_CAM_CONTINUE, 0x00, 30, CS_FLOAT(0x42700000, 60.0f), 68, -2, 1424, 0xA5ED),
        CS_CAM_POINT(CS_CAM_CONTINUE, 0x00, 30, CS_FLOAT(0x42700000, 60.0f), 68, -2, 1424, 0xA220),
        CS_CAM_POINT(CS_CAM_CONTINUE, 0x00, 30, CS_FLOAT(0x42700000, 60.0f), 68, -2, 1424, 0xA5A4),
        CS_CAM_POINT(CS_CAM_CONTINUE, 0x00, 30, CS_FLOAT(0x42700000, 60.0f), 68, -2, 1424, 0x20BA),
        CS_CAM_POINT(CS_CAM_CONTINUE, 0x00, 30, CS_FLOAT(0x42700000, 60.0f), 68, -2, 1424, 0xC9A5),
        CS_CAM_POINT(CS_CAM_CONTINUE, 0x00, 30, CS_FLOAT(0x42700000, 60.0f), 68, -2, 1424, 0xA5A2),
        CS_CAM_POINT(CS_CAM_STOP, 0x00, 30, CS_FLOAT(0x42700000, 60.0f), 68, -2, 1424, 0xA5BB),
    CS_END_OF_SCRIPT(),
};
// clang-format on
